package com.zhss.ddd.lottery.draw.activity.entity;

import com.zhss.ddd.lottery.draw.activity.api.ILotteryDrawActivity;
import com.zhss.ddd.lottery.draw.activity.vo.DrawLotteryContext;
import lombok.Data;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 抽奖活动的实体
 */
@Data
@Component
@Scope("prototype")
public class LotteryDrawActivity implements ILotteryDrawActivity {

    /**
     * 标识符
     */
    private Long id;
    /**
     * 抽奖活动开始时间
     */
    private String startTime;
    /**
     * 抽奖活动停止时间
     */
    private String endTime;
    /**
     * 奖品集合
     */
    private List<Prize> prizes;
    /**
     * 抽奖活动面向的候选人群
     */
    private CandidateGroup candidateGroup;
    /**
     * 每个抽奖候选人的抽奖次数
     */
    private Integer drawChancePerCandidate;

    /**
     * 获取抽奖活动数据
     */
    @Override
    public DrawLotteryContext getContext() {
        // 模拟DB
        return null;
    }

}
